package com.bf.electroplating.pojo.enums;

import lombok.Getter;

@Getter
public enum ProjectTypeEnum {

    XJ("0", "新建"),
    GJ("1", "改建"),
    KJ("2", "扩建");

    private final String code;
    private final String desc;

    private ProjectTypeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String getDesc(String code) {
        for (ProjectTypeEnum item : ProjectTypeEnum.values()) {
            if (item.getCode().equals(code)) {
                return item.getDesc();
            }
        }
        return null;
    }

}
